package team.headnurse.nursemanagement.dao;

import org.apache.ibatis.annotations.Mapper;
import team.headnurse.nursemanagement.model.VacationExpectation;

/**
 * @author Eugene-Forest
 */
@Mapper
public interface VacationExpectationDao {

    /**
     * 插入一条假期期望记录
     * @param expectation 假期期望对象
     * @return 如果成功则返回数字1
     */
    int insert(VacationExpectation expectation);

    /**
     * 通过id查找一条假期期望记录
     * @param staffId 员工id
     * @param priority 优先级
     * @return 如果成功则返回一个假期期望对象
     */
    VacationExpectation selectById(String staffId,int priority);

    /**
     * 更新一条假期期望记录
     * @param expectation 假期期望对象
     * @return 如果成功则返回数字1
     */
    int update(VacationExpectation expectation);

    /**
     * 删除一条假期期望记录
     * @param expectation 假期期望对象
     * @return 如果成功则返回数字1
     */
    int delete(VacationExpectation expectation);

}
